﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace Helpers.Class
{
    /// <summary>
    /// Base pour gérer les <see cref="UserControl"/> des modules
    /// </summary>
    public class UserControlBaseModule : UserControl
    {
        private Action _closeAction;
        public Action CloseAction
        {
            get
            {
                return _closeAction;
            }

            set
            {
                _closeAction = value;
                ((ViewModelBaseModule)this.DataContext).CloseAction = value;
            }
        }

        public virtual void OnNavigatedTo()
        { }
    }
}
